From 777c28444a2497733a2fb62308fa5e2ef434f427 Mon Sep 17 00:00:00 2001 From: justbur Date: Thu, 22 Oct 2015 09:59:36 -0400 Subject: [PATCH] Don't warn when same cons is added to alist twice --- which-key.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/which-key.el b/which-key.el index 81f6b272f7a..2e2c03b010c 100644 --- a/which-key.el +++ b/which-key.el @@ -542,9 +542,10 @@ bottom." (let ((key-lst (listify-key-sequence (kbd key)))) (cond ((null alist) (list (cons key-lst value))) ((assoc key-lst alist) - (message "which-key: changing %s name from %s to %s in the %s alist" - key (cdr (assoc key-lst alist)) value alist-name) - (setcdr (assoc key-lst alist) value) + (when (not (string-equal (cdr (assoc key-lst alist)) value)) + (message "which-key: changing %s name from %s to %s in the %s alist" + key (cdr (assoc key-lst alist)) value alist-name) + (setcdr (assoc key-lst alist) value)) alist) (t (cons (cons key-lst value) alist))))) -- 2.30.2